<template>
  {{ router.query }}

  <van-card v-for="user in userList"
            :desc="user.userRole"
            :title="user.username"
            :thumb="user.avatarUrl"
  >
    <template #tags>
      <van-tag v-for="tag in user.tags" style="margin-right: 8px;margin-top: 8px" plain type="danger">{{ tag }}
      </van-tag>
    </template>
    <template #footer>
      <van-button size="mini" @click="getContact(user)">获取联系方式</van-button>
      <!--      <van-button size="mini">按钮</van-button>-->
    </template>
  </van-card>

</template>
<script setup>


import {useRoute} from "vue-router";
import {ref} from "vue";
import {Toast} from "vant";

const router = useRoute()
const tagsTemp = router.query.tags
console.log("搜索结果页面" + tagsTemp)
const userInfo = ref({
  id: '1973',
  username: 'MC-大雷虎先锋',
  userAccount: 'Tcc.5267',
  avatarUrl: 'https://tccbucket.oss-cn-beijing.aliyuncs.com/%E7%BE%8E%E5%B0%91%E5%A5%B3.jpg',
  gender: '男',
  phone: '18027942111',
  email: '6211@azr0.cn',
  userStatus: '正常',
  userRole: '管理员',
  planetCode: 'Tcc',
  tags: ['Java', 'Vue'],
  createTime: new Date(),
})

const userList = ref({userInfo})
const getContact = (value) => {
  Toast.success('奴才这就去办~！');
  console.log("获取联系方式" + JSON.stringify(value))

}
</script>

<style scoped>

</style>